package cn.catsdad.base.service.api;

import cn.catsdad.base.entity.BaseCrudEntity;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/**
 * @author xuyl
 * @version 1.0 2024/8/29
 */
public interface IBaseCrudService<T extends BaseCrudEntity,ID extends Serializable> extends IBaseService<T,ID> {


    void logicDeleteById(ID id);

    void logicDeleteByIds(Collection<ID> ids);

    void logicDeleteByEntity(T entities);

    void logicDeleteByEntities(Collection<T> entities);

    List<T> queryByIdsWithIsDeletedFalse(Collection<ID> ids);

    T queryByIdWithIsDeletedFalse(ID id);

    Map<ID, T> queryMapWithIsDeletedFalse(Collection<ID> ids);

}
